package com.bdqn.tour.servlet.Gyh;

import com.bdqn.tour.pojo.PageInfo;
import com.bdqn.tour.pojo.User;
import com.bdqn.tour.service.GyhQueryALLUserInfoService;
import com.bdqn.tour.service.impl.GyhQueryALLUserInfoServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 查询全部用户信息
 */
@WebServlet("/gyhQueryALLUserInfo")
public class GyhQueryALLUserInfoServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doPost(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //设置字符编码
        resp.setContentType("text/html;charset=utf-8");
        //将数据交给拦截器执行
        //分页参数
      /*  String pageNoStr = req.getParameter("pageNo");
        String pageSizeStr = req.getParameter("pageSize");
        int pageNum = 1;
        int pageSize = 5;
        if(pageNoStr != null && !"".equals(pageNoStr)){
            pageNum = Integer.parseInt(pageNoStr);
        }
        if(pageSizeStr != null && !"".equals(pageSizeStr)){
            pageSize = Integer.parseInt(pageSizeStr);
        }*/

       /* //调用业务层查询全部用户信息
        GyhQueryALLUserInfoService service = new GyhQueryALLUserInfoServiceImpl();

        PageInfo<User> pageInfo = service.getPageEmp(pageNum, pageSize);
        //存入session集合
        req.getSession().setAttribute("pageInfo",pageInfo);*/
        //跳转页面
        req.getRequestDispatcher("/backStageManagement.jsp").forward(req,resp);




    }
}
